﻿using FriendStar.Code;
using FriendStar.Data;
using FriendStar.Domain.Entity.BaseData;
using FriendStar.Domain.IRepository.BaseData;
using FriendStar.Repository.BaseData;

namespace FriendStar.Repository.BaseData
{
    public class ZSJ_B1_GH_SIRepository : RepositoryBase<ZSJ_B1_GH_SIEntity>, IZSJ_B1_GH_SIRepository

    {    
        public void DeleteForm(string keyValue)
        {
            using (var db = new RepositoryBase().BeginTrans())
            {
                db.Delete<ZSJ_B1_GH_SIEntity>(t => t.UnitID == keyValue);
                db.Commit();
            }
        }
        public void SubmitForm(ZSJ_B1_GH_SIEntity userEntity,  string keyValue)
        {
            using (var db = new RepositoryBase().BeginTrans())
            {
                if (!string.IsNullOrEmpty(keyValue))
                {
                    db.Update(userEntity);
                }
 
                db.Commit();
            }
        }
    }
}
